package com.example.train.batch.feign;

import com.example.train.common.resp.CommonResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Date;

/**
 * @Author: invictusQAQ
 * @Date: 2023-09-27-20:06
 * @Description:
 */
@FeignClient(value = "business",fallback = BusinessFeignFallback.class) //应用名只代表ip+端口
//@FeignClient(name = "business",url = "http://127.0.0.1:8002/business")
public interface BusinessFeign {

    @GetMapping("/business/hello")
    String hello();

    @GetMapping("/business/admin/daily-train/gen-daily/{date}")
    CommonResp<Object> genDaily(@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd") Date date);

}
